﻿<UserControl x:Class="TheOliver.Controls.OnOffButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <Grid x:Name="LayoutRoot">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="VisualStateGroup">
    			<VisualStateGroup.Transitions>
    				<VisualTransition GeneratedDuration="0:0:0.4">
    					<VisualTransition.GeneratedEasingFunction>
    						<CircleEase EasingMode="EaseInOut"/>
    					</VisualTransition.GeneratedEasingFunction>
    				</VisualTransition>
    			</VisualStateGroup.Transitions>
    			<VisualState x:Name="OnState"/>
    			<VisualState x:Name="OffState">
    				<Storyboard>
    					<DoubleAnimation Duration="0" To="193" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="rectangle" d:IsOptimized="True"/>
    				</Storyboard>
    			</VisualState>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="0.5*"/>
    		<ColumnDefinition Width="0.5*"/>
    	</Grid.ColumnDefinitions>
    	<Rectangle x:Name="_background" Stroke="Black" RadiusX="4" RadiusY="4" Grid.ColumnSpan="2">
    		<Rectangle.Fill>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#FF666666" Offset="0"/>
    				<GradientStop Color="Silver" Offset="1"/>
    			</LinearGradientBrush>
    		</Rectangle.Fill>
    	</Rectangle>
    	<Rectangle x:Name="rectangle" Fill="#FFF4F4F5" Stroke="Black" Margin="8,8,0,8" RadiusX="4" RadiusY="4" RenderTransformOrigin="0.5,0.5">
    		<Rectangle.RenderTransform>
    			<CompositeTransform/>
    		</Rectangle.RenderTransform>
    	</Rectangle>

    </Grid>
</UserControl>
